import { reactive } from "../../reactive";
import { effect, depsMap } from "../../effect/effect";

const state = reactive({
  a: 123,
  b: 456,
  c: 789,
});

effect(() => {
  if (state.a === 123) state.b;
  else state.c;
  console.log("fn1");
  console.log("------------");
});
console.log(1111, depsMap);

effect(() => {
  state.c;
  console.log("fn2");
  console.log("------------");
});
console.log(2222, depsMap);

state.a = 0;
console.log(3333, depsMap);
